package com.it.smn.divide.loadbalance;

/**
 * <负载均衡策略枚举>
 * <负载均衡策略枚举>
 *
 * @Author sunmannian
 * @Description
 * @Date 2020/8/27 18:11
 **/
public enum LoadBalance {

    Random(new RandomLoadBalance()), RoundRobin(new RoundRobinLoadBalance());

    private LoadBalanceStrategy loadBalanceStrategy;

    LoadBalance(LoadBalanceStrategy loadBalanceStrategy) {
        this.loadBalanceStrategy = loadBalanceStrategy;
    }

    public LoadBalanceStrategy getLoadBalanceStrategy() {
        return loadBalanceStrategy;
    }}
